package io.github.talelin.latticy.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import io.github.talelin.latticy.dto.CategoryDTO;
import io.github.talelin.latticy.model.Category;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author tanrnetao
 * @since 2021-08-11
 */
public interface CategoryService extends IService<Category> {

    void updateCategory(CategoryDTO dto, Integer id);

    void deleteCategory(Integer id);

    Category getCategoryById(Integer id);

    IPage<Category> getCategoriesByPage(Integer count, Integer page, Integer root);

    IPage<Category> getSubCategoriesByPage(Integer count, Integer page, Integer id);


}
